import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class AdjacencyList
{
	private String filePath;
	
	public AdjacencyList() throws IOException
	{
        getFileName();
        readFile();
	}
	
	

	private void getFileName()
	{
        Scanner scan = new Scanner(System.in);
        System.out.print("Please type your file name correctly -> ");
        filePath = scan.nextLine();
        scan.close();
        
	}
    
    private void readFile() throws IOException {

            Scanner scanFile = null;

            try 
            {
            	scanFile = new Scanner(new BufferedReader(new FileReader(filePath)));

                // Print out the outputs
                while (scanFile.hasNext())
                {
                	String a = scanFile.next();
                	String b = scanFile.next();
                	int c = Integer.parseInt(scanFile.next());
                	System.out.print(a + " ");
                	System.out.print(b + " ");
                	System.out.println(c);
                	
                	/*                                                 */                	
                	/* Now should call build a new Vertex with weights */
                	/*                                                 */
                	//
                	//
                }
                
            } 
            catch(IOException io){
              System.out.println("Something went wrong, please do it correctly!!");
            } finally {
                if (scanFile != null) 
                	scanFile.close();
            }
        }
    
    
    
    
    
    
    
    
    
}
